package com.example.materialviewpagerdemo;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;

import com.example.materialviewpagerdemo.view.UtilBitmap;

public class QRActivity extends Activity {

    private ImageView imageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_qr);
        initView();
        generate();
    }

    public void initView()
    {
        imageView=findViewById(R.id.QRImage);
    }

    public void generate() {
        Bitmap qrBitmap = UtilBitmap.getDRBitmap("http://202.194.131.174:8080/DownloadAPK/DownLoad/garlic/apk",400,400);
        imageView.setImageBitmap(qrBitmap);
    }
}
